package com.xiaotu.facade;

/**
 * @author 张晓
 * @create 2020-06-22 15:46
 */
public class Popcorn {
    //使用单利模式，使用饿汉式
    private static Popcorn instance = new Popcorn();

    public static Popcorn getInstance(){
        return instance;
    }

    public void on(){
        System.out.println(" popcorn on ");
    }

    public void off(){
        System.out.println(" popcorn off ");
    }

    public void pop(){
        System.out.println(" popcorn is poping ");
    }
}
